home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Bavarian
/
Bavarian #087 (19xx)(APS Electronic).zip
/
Bavarian #087 (19xx)(APS Electronic).adf
/
Programme
/
AktieVD3.25
< prev
next >
Wrap
Text File
|
1989-02-05
|
21KB
|
561 lines
IF FRE(0)<50000& THEN CLEAR ,70000&
anfang:
CLEAR
ON BREAK GOSUB 0
ON ERROR GOTO achtung
CHDIR ":Daten"
DIM SHARED nam$(8,16),aktie$(8),zahl$(8,5),monat$(14),anz(12),anf(15),wert1$(10),geld(40)
DIM SHARED wahr(40),tag$(366),wert(8,366),defis$(20)
ausgabeart=0
a=VAL(RIGHT$(DATE$,4))
jahr=a-1988
DATA "Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"
31 DATA 31,29,31,30,31,30,31,31,30,31,30,31
32 DATA "USA","CAN","GB","IRL","CH","B","F","NL","D","I","DK","NK","SK","YU","P","E","J","A"
FOR q=1 TO 12:READ a$:monat$(q)=a$:NEXT
FOR w=1 TO 12
READ w$:e=VAL(w$)
IF e=29 AND a/4 <> INT(a/4) THEN e=28
FOR q=1 TO e:tag=tag+1
IF q=1 THEN anf(w)=tag
tag$(tag)=STR$(q)+"."+monat$(w)
anz(w)=e
NEXT:NEXT
RESTORE 31:a=VAL(LEFT$(DATE$,2)):b=VAL(MID$(DATE$,4,2)):tag=0
FOR q=1 TO a-1
READ c$:c=VAL(c$):tag=tag+c
NEXT:tag=tag+b:tag=(INT(tag/7))*7
RESTORE 32:FOR q = 1 TO 18
READ defis$(q):NEXT
OPEN "kurse" FOR INPUT AS #1
FOR q = 1 TO 36
INPUT #1,wahr(q)
NEXT:CLOSE #1
SCREEN 2,640,256,2,2
WINDOW 1," LANGSAME DEMOVERSION !!!!",(0,0)-(631,200),0,2
Colors:
PALETTE 2,0,0,0
PALETTE 1,.1,1,1
PALETTE 0,.5,.5,.5
PALETTE 3,.9,.9,.9
PAINT(10,10),3
MENU 1,0,1,"Projekt "
MENU 1,1,1,"Info "
MENU 1,2,1,"Neustart "
MENU 1,3,1,"Daten laden "
MENU 1,4,1,"Daten sichern"
MENU 1,5,1,"Daten löschen"
MENU 1,6,1,"Ende "
MENU 2,0,1,"Ausgabe "
MENU 2,1,1,".. in Zahlen -"
MENU 2,2,1,".. in Grafik "
MENU 3,0,1,"Spezielles "
MENU 3,1,1,"Statistik "
MENU 3,2,1,"Drucken "
MENU 3,3,1,"Umrechnen "
MENU 3,4,1,"Valuten "
MENU 3,5,1,"Dividende "
MENU 4,0,0," "
LINE(500,5)-(590,20),,bf
LINE(190,5)-(430,20),,bf
LINE(20,5)-(120,20),,bf
CALL linieren(500!,5!,590!,20!)
CALL linieren(190!,5!,430!,20!)
CALL linieren(20!,5!,120!,20!)
COLOR 2,1:LOCATE 2,34:PRINT"AKTIEN V3.2"
LOCATE 2,5:PRINT DATE$
LINE (10,40)-(180,178),3,bf
CALL linieren(10!,40!,178!,178!)
LINE (210,40)-(610,177),3,bf
CALL linieren(210!,40!,610!,177!)
w=0
FOR q = 1 TO 16 STEP 2:w=w+1:COLOR 2,3
LOCATE q+6,3:PRINT w:LOCATE q+6,5:PRINT"."
COLOR 3,0:LOCATE q+6,6:PRINT" ":NEXT
GOSUB info:LOCATE 5,38:COLOR 2,3:PRINT tag$(tag)+" - "+tag$(tag+6)
MOUSE ON:MENU ON
wahl1:
IF fehler=1 THEN anfang
COLOR 2,1
zeile=CSRLIN:spalte=POS(0)
LOCATE 2,65:PRINT TIME$
LOCATE zeile,spalte
ON MENU(0) GOTO projekt,ausgabe,spezi
IF MOUSE(0)<-1 THEN GOSUB eingabe
GOTO wahl1
projekt:
ON MENU(1) GOSUB info,neu,laden,speichern,loschen,ende
GOTO wahl1
ausgabe:
ON MENU(1) GOSUB gitter,grafik
GOTO wahl1
spezi:
ON MENU(1) GOSUB statistik,drucken,umrechnen,changer,dividende
GOTO wahl1
gitter:
IF WINDOW(0)=2 THEN WINDOW CLOSE 2:WINDOW OUTPUT 1
LINE(210,40)-(610,177),3,bf
LINE(210,40)-(610,177),2,b
LINE(16,183)-(630,196),3,bf
MENU 2,1,1,".. in Zahlen -"
MENU 2,2,1,".. in Grafik "
ausgabeart=0
FOR q = 1 TO 16 STEP 2
LINE(230,48+q*8)-(587,48+q*8),0
NEXT
CALL dreieck(215!,166!,235!,176!,18!,3!)
CALL dreieck(585!,165!,605!,176!,2!,3!)
GOSUB werteeinsetzen
WINDOW OUTPUT 1
RETURN
werteeinsetzen:
COLOR 2,3:LOCATE 5,38:PRINT tag$(tag)+" - "+tag$(tag+6)+" "
FOR q = 1 TO 8
FOR w = 0 TO 6
LOCATE q*2+5,31+w*6:a$=STRING$(6-LEN(STR$(wert(q,tag+w))),32)
PRINT wert(q,tag+w);a$
NEXT:NEXT
RETURN
neu:
CALL sure(" Neustart !?"):GOSUB gitter
IF flag=1 THEN fehler=1
RETURN
ende:
CALL sure(" Programm beenden !?"):GOSUB gitter
IF flag=1 THEN MENU RESET:SYSTEM
RETURN
speichern:
CALL datensl1("Daten sichern"):GOSUB gitter
IF e=1 THEN GOSUB RETURN
GOSUB gitter
OPEN b$ FOR OUTPUT AS #1
FOR q = 1 TO 366
PRINT #1,wert(wahl,q)
NEXT:CLOSE #1:wahl=0
RETURN
laden:
CALL datensl1("Daten laden"):GOSUB gitter
IF e = 1 THEN RETURN
OPEN b$ FOR INPUT AS #1
FOR q = 1 TO 366
INPUT #1,wert(wahl,q)
IF wert(wahl,q)<0 OR wert(wahl,q)>99999& THEN q=366:ERROR 54
NEXT:CLOSE #1:wahl=0:GOSUB gitter
RETURN
loschen:
CALL datensl1("Daten löschen"):GOSUB gitter
IF e = 1 THEN GOSUB gitter:RETURN
KILL b$:GOSUB gitter
RETURN
SUB datensl1(a$) STATIC
SHARED e,b$,wahl,flag
e=0
CALL datensl(a$)
CALL auswahl(8!,16!,240!,80!,2!)
IF aktie$(wahl)=STRING$(0,32) THEN BEEP:BEEP:e=1:PAINT(400,100),3:EXIT SUB
LOCATE 2+wahl,7:COLOR 2,1:PRINT " "+aktie$(wahl)+" "
CALL maus1(10!,93!,80!,106!,156!,93!,222!,106!)
IF flag=1 THEN e=1
IF e=1 THEN EXIT SUB
b$=aktie$(wahl)+STR$(1988+jahr)+".Dat"
END SUB
SUB datensl(a$) STATIC
LINE(210,40)-(610,178),3,bf
LINE(210,40)-(610,178),2,b
WINDOW CLOSE 2:CALL linieren(294!,46!,534!,171!)
WINDOW 2,a$,(294,54)-(530,168),0,2
PAINT (400,100),0:COLOR 3,0
LINE(10,93)-(80,106),1,bf:COLOR 2,1:LOCATE 13,4:PRINT "ZURÜCK"
LINE(156,93)-(222,106),1,bf:LOCATE 13,24:PRINT "OK"
CALL linieren(10!,93!,80!,106!):CALL linieren(156!,93!,222!,106!)
LOCATE 1,4:COLOR 3,0:PRINT " Welche Aktie ?"
FOR q = 1 TO 8
LOCATE q+2,2:PRINT q". "aktie$(q)
NEXT
END SUB
SUB auswahl(x1,y1,x2,y2,su) STATIC
SHARED wahl
10 IF MOUSE(0)>-1 THEN 10
x=MOUSE(1):y=MOUSE(2)
IF x<x1 OR x>x2 OR y<y1 OR y>y2 THEN BEEP:BEEP:GOTO 10
x=INT(x/8):y=INT(y/8)
wahl=y-su+1
END SUB
grafik:
MENU 2,1,1,"..in Zahlen "
MENU 2,2,1,"..in Grafik -"
ausgabeart=1
LINE(211,41)-(609,176),0,bf:LINE (210,40)-(610,177),2,b
18 LINE(552,183)-(622,193),0,bf
COLOR 3,0:LOCATE 24,71:PRINT 1988+jahr
CALL linieren(552!,183!,622!,193!)
FOR q = 0 TO 11
LINE (q*44+16,183)-(q*44+48,193),0,bf
CALL linieren(q*44+16!,183!,q*44+48!,193!)
LOCATE 24,INT(5.53*q+3)+1:PRINT LEFT$(monat$(q+1),3)
NEXT:COLOR 3,3:LOCATE 5,30:PRINT" "
flag5=0:jump=0:flag4=0
11 IF MENU(0)>0 AND MENU(1)>0 THEN GOTO 12
IF MOUSE(0)>-1 THEN GOTO 11
x=MOUSE(1):y=MOUSE(2)
IF x>40 AND x<163 AND y>45 AND y<170 THEN help1=INT(y/8):num=INT((help1-7)/2)+2:COLOR 2,0:LOCATE help1+1,6:PRINT aktie$(num):flag4=1:flag4=1
IF y>177 THEN num1=INT((x/5.53-4)/8)+1:help=INT(5.53*(num1-1)+3)+1:COLOR 2,0:LOCATE 24,help:PRINT LEFT$(monat$(num1),3):flag4=2:jump=1:flag5=1
IF y>177 AND x>560 THEN COLOR 2,0:LOCATE 24,71:PRINT 1988+jahr:flag4=2:jump=2:flag5=1
IF flag4=0 THEN BEEP:GOTO 11
IF flag4<> 1 OR flag5<>1 THEN 11
grafikfehler=0:CALL hilo(num!,num1!):hi1=hi:lo1=lo
IF grafikfehler=1 THEN BEEP:ERROR 54
COLOR 3,0:LOCATE help1+1,6:PRINT aktie$(num)
IF hi=0 OR lo=0 THEN BEEP:GOTO 18
ON jump GOSUB mubersicht,jubersicht
IF flag=1 AND jump=1 THEN 18
IF flag<> 2 THEN grafik
12 links=0:GOSUB gitter:RETURN
jubersicht:
LINE(221,41)-(612,176),0,bf:rechts=0:links=0
LINE(220,50)-(220,170),3
LINE(220,170)-(600,170),3
IF wert(8,1)>0 THEN CALL hilo(8!,13!):GOSUB second
IF lo=0 OR hi=0 THEN GOSUB gitter:ERROR 54:flag=2:RETURN
CALL pfeil(220!,50!,600!,170!)
CALL teilung(220!,170!,586!,7!,110!):abst=0
27 IF rechts=0 THEN rechts=1 ELSE rechts=0
CALL nina(365!,num,222!,60!,370!,220!)
COLOR 3,0:LOCATE 24,71:PRINT 1988+jahr
LOCATE 2*num+5,6:PRINT aktie$(num):COLOR 1,0
CALL zeifertig:IF flag=1 AND rechts=1 AND wert(8,1)>0 AND num<>8 THEN num=8:GOTO 27
RETURN
second:
IF hi1>hi THEN hi=hi1
IF lo1<lo THEN lo=lo1
RETURN
SUB zeifertig STATIC
SHARED flag
LINE(16,183)-(630,196),3,bf
LINE(352,183)-(416,193),0,bf:CALL linieren(352!,183!,416!,193!)
LINE(440,183)-(504,193),0,bf:CALL linieren(440!,183!,504!,193!)
LOCATE 24,46:PRINT "WEITER":LOCATE 24,57:PRINT"ZURÜCK"
CALL maus1(352!,183!,488!,194!,440!,183!,504!,194!)
LINE(16,183)-(630,196),3,bf
END SUB
mubersicht:
IF links=1 THEN links=0:w=420:GOTO 17
LINE(221,42)-(609,169),0,bf
FOR q = 0 TO 1
LINE(240+q*180,66)-(240+q*180,170),3
CALL pfeil(240+q*180!,66!,390+q*180!,170!)
LINE (240+q*180,170)-(390+q*180,170),3
CALL teilung(240+q*180!,170!,392+q*180!,5!,100!)
NEXT:w=240!:links=1
17 CALL nina(anz(num1),num,w,74!,150!,w)
CALL zeifertig
RETURN
SUB nina(fini,num,b,c,abst1,x) STATIC
SHARED hi,lo,abst,links,num1,rechts
IF rechts=1 THEN farbe=2 ELSE farbe=1
IF fini<300 THEN farbe=2
IF fini<300 THEN multi = 5 ELSE multi=1 AND anf(num1)=1
IF multi = 1 THEN COLOR 2,3:LOCATE 5,38:PRINT "Min.:";lo;" Max.:";hi
IF multi = 5 THEN COLOR 2,0:LOCATE 8,55-20*links:PRINT"Min.:";lo:LOCATE 9,55-20*links:PRINT"Max.:";hi:LOCATE 7,55-20*links:PRINT monat$(num1)
diff=hi-lo:diff$=STR$(diff)
pixel=diff/(170-c):wert1=wert(num,anf(num1))-lo:y=170-wert1/pixel
abst=INT(1000/pixel)
IF farbe=2 THEN CALL teilung1(x,pixel,abst1)
FOR q = anf(num1) TO anf(num1)+fini-1
hx=x:hy=y:IF wert(num,q)=0 THEN q=anf(num1)+fini-1:GOTO 90
IF wert(num,q)<lo THEN wert(num,q)=lo
IF wert(num,q)>hi THEN wert(num,q)=hi
x=x+1*multi:wert1=wert(num,q)-lo:y=170-wert1/pixel
LINE(hx,hy)-(x,y),farbe
90 NEXT
LOCATE INT(y/8)+1,INT(x/8)+1:COLOR 3,0:PRINT num
LOCATE 2*num+5,6:COLOR 3,0:PRINT aktie$(num)
END SUB
SUB hilo(num!,num1!) STATIC
SHARED hi,lo,jahr,e,day,day1,tag,grafikfehler
e=0:r=tag
IF num1 < 13 THEN r=anf(num1)+anz(num1)-1 ELSE anf(num1)=1
hi=wert(num,anf(num1)):lo=hi
FOR q = anf(num1) TO r
IF wert(num,q)=0 AND num1<13 THEN grafikfehler=1:GOTO 70
IF wert(num,q)=0 THEN 70
IF wert(num,q)<lo THEN lo=wert(num,q):day1=q
IF wert(num,q)>hi THEN hi=wert(num,q):day=q
70 NEXT
END SUB
SUB teilung(x,y,x1,abst,abst1) STATIC
FOR q = x TO x1 STEP abst
LINE(q,y-1)-(q,y-abst1+3),3
NEXT
END SUB
SUB teilung1(x,pixel,abst1) STATIC
SHARED hi,lo:p=10:dif=hi-lo
IF dif>120 THEN p=100
IF dif>1200 THEN p=1000
IF dif>12000& THEN p=10000
COLOR 2,0:LOCATE 7,71:PRINT p;" "
a=(INT(lo/p))*p+p
91 IF a>=hi THEN END SUB
q=170-INT((a-lo)/pixel):LINE(x,q)-(x+abst1,q),3
a=a+p:GOTO 91
SUB pfeil(x,y,x1,y1) STATIC
LINE (x,y)-(x+3,y+3),3
LINE (x,y)-(x-3,y+3),3
LINE (x1,y1)-(x1-3,y1-3),3
LINE (x1,y1)-(x1-3,y1+3),3
END SUB
info:
WINDOW CLOSE 2:CALL linieren(224!,50!,596!,167!)
WINDOW 2," Autorenvermerk",(224,60)-(592,167),0,2
PAINT(15,15),0:COLOR 3,0
LOCATE 2,4:PRINT"Programmname : Aktien V3.2"
LOCATE 3,4:PRINT"Programmart : Aktienverwaltungsprogramm"
LOCATE 4,4:PRINT"Computer : Amiga 500,1000,2000"
LOCATE 5,4:PRINT"Sprache : Amiga Basic"
LOCATE 6,4:PRINT"Autor : Helmut Gaberschek"
LOCATE 8,16:PRINT"(c) 30.7.1988"
LINE (30,65)-(78,83),1,bf
CALL linieren(30!,65!,78!,83!)
COLOR 2,1:LOCATE 10,7:PRINT"OK"
LINE (305,65)-(353,83),1,bf
CALL linieren(305!,65!,353!,83!)
LOCATE 10,41:PRINT"OK"
CALL maus1(30!,65!,78!,83!,305!,65!,353!,83!)
GOSUB gitter
RETURN
SUB maus1(x,y,x1,y1,x2,y2,x3,y3) STATIC
SHARED flag
flag=0
mau1:
IF MOUSE(0)>-1 THEN GOTO mau1
xk=MOUSE(1):yk=MOUSE(2)
IF xk>x AND xk<x1 AND yk>y AND yk<y1 THEN flag=1
IF xk>x2 AND xk<x3 AND yk>y2 AND yk<y3 THEN flag=2
IF flag>0 THEN END SUB
GOTO mau1
SUB linieren(x,y,x1,y1) STATIC
LINE (x,y)-(x1,y),2
LINE (x1,y)-(x1,y1),2
LINE (x,y)-(x,y1),2
LINE (x,y1)-(x1,y1),2
LINE (x1,y+5)-(x1+5,y1),2,bf
LINE (x+5,y1)-(x1+5,y1+3),2,bf
END SUB
SUB dreieck(x,y,x1,y1,p1,farbe) STATIC
a = 2
3 LINE(x,y)-(x1,y1),a,b
LINE(x,y)-(x1,y1),a
LINE(x,y1)-(x1,y),a
PAINT(x+p1,y+8),2
IF a = farbe THEN END SUB
a = farbe:GOTO 3
eingabe:IF ausgabeart=1 THEN RETURN
prufung:flag2=0
IF MOUSE(0)=0 THEN prufung
x=MOUSE(1):y=MOUSE(2)
IF x>40 AND x<163 AND y>45 AND y<170 THEN flag2=1
IF x>247 AND x<543 AND y>45 AND y<166 THEN flag2=2
IF x<239 AND x>228 AND y>169 AND y<176 THEN tag=tag-7:flag2=3:IF tag <= 1 THEN tag=1
IF x>583 AND x<593 AND y>169 AND y<176 THEN tag=tag+7:flag2=3:IF tag >= 360 THEN tag=360
IF flag2 = 0 THEN BEEP:RETURN
BEEP
IF flag2=3 THEN GOSUB werteeinsetzen:RETURN
x=INT(x/8):y=INT(y/8):IF y/2 = INT(y/2) THEN y=y+1
num=((y-7)/2)+1:w=0
IF flag2=1 THEN COLOR 3,0:LOCATE y,x+1:PRINT"|":index=5
IF flag2=1 THEN CALL editor(y,x,num,flag2,48!,122!,6!,19!,index,ad,0!)
IF flag2=2 THEN x=INT(x/6)*6+1:ad=INT(x/6)-5:lrand=x:rrand=x+4:LOCATE y,x+1:COLOR 0,3:PRINT"| ":index=x+1
IF flag2=2 THEN CALL editor(y,x,num,flag2,46!,57!,lrand,rrand,index,ad,0!)
IF flag6=1 THEN GOSUB werteeinsetzen
RETURN
SUB editor(y,x,num,flag2,ugrenze,ogrenze,lrand,rrand,index,ad,a) STATIC
SHARED flag6
e=0:IF flag6=1 THEN flag6=0:x=x+1
IF flag2=3 THEN index=x:COLOR 2,1:hx=x
2 a$=INKEY$:IF a$ = ""THEN 2
IF ASC(a$)<ugrenze OR ASC(a$)>ogrenze THEN falsch=1
IF a$ <> CHR$(13) AND a$ <> CHR$(8) AND falsch=1 THEN falsch=0:GOTO 2
IF a$ = CHR$(13) AND flag2=1 THEN e=1:CALL ende1(y,x,num)
IF a$ = CHR$(13) AND flag2=2 THEN e=1:CALL ende2(y,x,num,lrand,ad)
IF a$ = CHR$(13) AND flag2=3 THEN e=1:CALL ende3(y,hx,num,a,rrand)
IF e=1 THEN END SUB
IF x <= lrand AND a$=CHR$(8) THEN BEEP:x=lrand:GOTO 2
IF x > rrand THEN BEEP:x=rrand:m=1:GOTO 2
m=0
IF w = 0 THEN x=x+1
IF a$ <> CHR$(8) THEN w = 0
IF a$ = CHR$(8) THEN x = x -1:a$=" ":w=w+1
LOCATE y,x
PRINT a$ :LOCATE y,x+1:PRINT"|"
IF w>0 THEN LOCATE y,x:PRINT"| "
IF flag2<2 THEN nam$(num,x-index)=a$ ELSE wert1$(x-index)=a$
GOTO 2
SUB ende1(y,x,num) STATIC
SHARED flag6,x
FOR q = 14 TO 0 STEP -1
IF nam$(num,q)=CHR$(32) THEN nam$(num,q)=STRING$(0,32)
NEXT:aktie$(num)=STRING$(0,32)
FOR q=0 TO 14
aktie$(num)=aktie$(num)+nam$(num,q)
NEXT:a$=STRING$(16-LEN(aktie$(num)),32)
LOCATE y,6:PRINT aktie$(num)+a$
IF x=6 THEN FOR q = 1 TO 366:wert(num,q)=0:NEXT:flag6=1:x=x+1
BEEP:END SUB
SUB ende2(y,x,num,lrand,ad) STATIC
SHARED tag,jahr
FOR q=0 TO 4:l$=l$+wert1$(q):wert1$(q)=STRING$(0,32):NEXT:geldi=VAL(l$):la=LEN(l$)+1:l$=STRING$(0,32)
wert(num,tag+ad)=geldi
LOCATE y,lrand:PRINT wert(num,tag+ad);a$:BEEP
END SUB
SUB ende3(y,x,num,b,rrand) STATIC
SHARED geldi
FOR q=0 TO 6:l$=l$+wert1$(q):wert1$(q)=STRING$(0,32):NEXT:geldi=VAL(l$):la=LEN(l$)+1:l$=STRING$(0,32)
IF b=0 THEN wahr(num)=geldi
LOCATE y,x:PRINT geldi;STRING$(la-LEN(STR$(geldi)),32):BEEP
END SUB
achtung:
BEEP:BEEP:BEEP
IF WINDOW(0)=2 THEN WINDOW CLOSE 2
LOCATE 5,37:COLOR 2,3:q=365:fehler$="! Unbekannter Fehler ! "
IF ERR=53 THEN fehler$="! Datei nicht gefunden ! "
IF ERR=57 THEN fehler$="! Ein-/Ausgabefehler ! "
IF ERR=61 THEN fehler$="! Diskette voll ! "
IF ERR=70 THEN fehler$="! Schreibschutz entfernen ! "
IF ERR=54 THEN fehler$="! Unerlaubter Aktienwert ! "
IF ERR=68 THEN fehler$="! Gerät nicht verfügbar ! "
IF ERR=51 THEN fehler$="! Interner Fehler ! ":fehler=1
IF ERR=67 THEN fehler$="! Zuviele Dateien ! "
IF ERR=74 THEN fehler$="! Unbekannte Diskette ! "
IF ERR=62 THEN fehler$="! Zu wenige Daten ! "
PRINT fehler$
14 IF MOUSE(0)>-1 GOTO 14
GOSUB gitter
RESUME wahl1
SUB auswahl2(a) STATIC
SHARED wahl2,hx,hy
wahl2=0
x=MOUSE(1):y=MOUSE(2):spalte=INT(x/58+.3)
IF a=1 AND spalte/2=INT(spalte/2) THEN spalte=spalte-1
lo(1)=8:lo(2)=15:lo(3)=27:lo(4)=34:hx=lo(spalte)
wahl2=INT(y/8)+(spalte)*9-9:hy=INT(y/8)+1
END SUB
statistik:
45 CALL datensl1("Statistik"):IF e=1 THEN GOSUB gitter:RETURN
LINE(221,41)-(609,177),3,bf:GOSUB gitter
WINDOW CLOSE 2:CALL linieren(235!,48!,585!,168!)
WINDOW 2," Statistik",(235,58)-(585,168),0,2:CLS:PAINT(270,60),1
LINE(48,84)-(120,98),3,bf:CALL linieren(48!,84!,120!,98!)
LINE(232,84)-(296,98),3,bf:CALL linieren(232!,84!,296!,98!)
COLOR 2,3:LOCATE 12,8:PRINT " ZURÜCK":LOCATE 12,31:PRINT "WEITER":COLOR 2,1
LOCATE 9,13:PRINT "Bitte warten..(7 sek)"
CALL hilo(wahl,13!):LOCATE 9,10:PRINT " "
LOCATE 2,3 :PRINT "Name der Aktie : ";aktie$(wahl)
LOCATE 3,3:PRINT "Kurswert : ";wert(wahl,tag)
LOCATE 4,3:PRINT "höchster Wert : ";hi;:LOCATE 4,29:PRINT "(";tag$(day);")"
LOCATE 5,3:PRINT "niederster Wert : ";lo;:LOCATE 5,29:PRINT "(";tag$(day1);")"
LOCATE 6,3:PRINT "Durchschnitt : ";(hi+lo)/2
LOCATE 7,3:PRINT "Gewinn : ";wert(wahl,tag)-wert(wahl,day1)
46 IF MOUSE(0)>-1 THEN 46
CALL maus1(48!,84!,120!,98!,232!,84!,296!,98!)
IF flag=1 THEN GOSUB gitter:RETURN
GOSUB gitter:GOTO 45
changer:
CALL aufbau(" Valuten-Kurse","ZURÜCK")
COLOR 0,1:z(1)=7:z(2)=14:z(3)=26:z(4)=33
FOR q=0 TO 3:FOR w=1 TO 9
LOCATE 1+w,z(q+1):PRINT wahr(q*9+w):NEXT:NEXT
22 flag=0:CALL maus2(0!):IF flag>0 THEN OPEN "kurse" FOR OUTPUT AS #1:FOR q= 1 TO 36:PRINT #1,wahr(q):NEXT:CLOSE #1:WINDOW CLOSE 2:WINDOW OUTPUT 1:GOSUB gitter:RETURN
GOTO 22
umrechnen:
CALL aufbau(" Umrechnen","NULL"):z(1)=7:z(2)=26:COLOR 2,1
23 i=0:FOR q=0 TO 1:FOR w=1 TO 9:lang=LEN(STR$(geld(w+i))):a$=LEFT$(STR$(geld(w+i)),14)
a$=a$+STRING$(15-LEN(a$),32):LOCATE 1+w,z(q+1):PRINT a$:NEXT:i=18:NEXT
flag=0:CALL maus2(1!):IF flag>1 THEN WINDOW CLOSE 2:WINDOW OUTPUT 1:GOSUB gitter:RETURN
IF flag=1 THEN FOR q=0 TO 36:geld(q)=0:NEXT:GOTO 23
grosch=geldi*wahr(wahl2)
FOR q=1 TO 36:geld(q)=grosch/wahr(q):NEXT:GOTO 23
SUB aufbau(a$,heli$) STATIC
SHARED flag,wahl2,flag1
FOR q=1 TO 36:geld(q)=0:NEXT
LINE(221,41)-(609,177),3,bf:WINDOW CLOSE 2:CALL linieren(235!,48!,585!,168!)
WINDOW 2,a$,(235,58)-(585,168),0,2:PAINT (240,60),1
x=0:COLOR 3,1:FOR q=1 TO 18:y=q:IF y>=10 THEN y=y-9:x=20
LOCATE y+1,x+4:PRINT defis$(q):NEXT
LINE (48,84)-(120,98),3,bf:CALL linieren(48!,84!,120!,98!)
LINE (232,84)-(304,98),3,bf:CALL linieren(232!,84!,304!,98!)
COLOR 2,3:LOCATE 12,8:PRINT heli$:LOCATE 12,31:PRINT "ZURÜCK"
END SUB
dividende:
CALL datensl1("Dividende"):GOSUB gitter:IF e=1 THEN GOSUB gitter:RETURN
LINE(221,41)-(609,177),3,bf:WINDOW CLOSE 2:CALL linieren(235!,48!,586!,172!)
WINDOW 2," Dividende",(235,58)-(585,172),0,2:PAINT (240,60),1
63 LINE(48,84)-(120,98),3,bf:CALL linieren(48!,84!,120!,98!):proz=0
LINE(232,84)-(304,98),3,bf:CALL linieren(232!,84!,304!,98!)
COLOR 2,3:LOCATE 12,11:PRINT "OK":LOCATE 12,32:PRINT "ZURÜCK":flag=0
CALL dreieck(140!,84!,160!,96!,18!,1!):CALL dreieck(192!,84!,212!,96!,2!,1!)
COLOR 2,1:LOCATE 2,6:PRINT "Dividende :":LOCATE 2,25:PRINT aktie$(wahl)
grafikfehler=0
60 COLOR 2,3:LOCATE 2,18:PRINT LEFT$(STR$(proz),4)+" ":COLOR 2,1
IF MOUSE(0)>-1 THEN GOTO 60
x=MOUSE(1):y=MOUSE(2)
IF x>48 AND x<120 AND y>80 THEN GOTO 61
IF x>232 AND x<304 AND y>80 THEN GOSUB gitter:RETURN
IF x>140 AND x<160 AND y>84 AND y<96 THEN proz=proz-.1
IF x>192 AND x<212 AND y>84 AND y<96 THEN proz=proz+.1
IF proz<=0 THEN proz=0
IF proz>=99 THEN proz=99
FOR q=1 TO 300:NEXT:GOTO 60
61 CLS:BEEP:diwij=0:FOR q= 1 TO 12
LOCATE q,2:PRINT monat$(q):CALL hilo(wahl,q):LOCATE q,18:PRINT ":"
diwi=(hi-wert(wahl,1))/100*proz:IF diwi<0 THEN diwi=0:diwi$="Verlust" ELSE diwi$=STR$(diwi)+" "
LOCATE q,20:PRINT diwi$:diwij=diwij+diwi:NEXT
LINE(140,95)-(250,95),2:LOCATE 13,2:PRINT aktie$(wahl);" (";LEFT$(STR$(proz),4);" %)":LOCATE 13,20:PRINT "+";diwij
62 IF MOUSE(0)>-1 THEN GOTO 62
CLS:GOTO 63
SUB maus2(a) STATIC
SHARED flag,wahl2,hy,hx
40 IF MOUSE(0)>-1 THEN 40
IF MOUSE(2)>80 THEN CALL maus1(48!,84!,120!,98!,232!,84!,296!,98!):IF flag<>0 THEN EXIT SUB
CALL auswahl2(a):COLOR 2,1:BEEP
LOCATE INT(hy),INT(hx):PRINT"|":CALL editor(hy,hx-1,wahl2,3!,46!,57!,7!,hx+4,hx-1,0!,a)
END SUB
drucken:
CALL datensl1("Drucken"):GOSUB gitter
OPEN "lpt1:" FOR OUTPUT AS#2
PRINT #2,aktie$(wahl)+STR$(1988+jahr)
FOR q=1 TO 366
PRINT #2,tag$(q)+" "+STR$(wert(wahl,q))
IF wert(wahl,q)=0 THEN q=365
NEXT
CLOSE #2:GOSUB gitter:RETURN
SUB sure(a$) STATIC
SHARED flag
WINDOW CLOSE 2
LINE (221,41)-(609,176),3,bf:CALL linieren(300!,50!,500!,120!)
WINDOW 2,a$,(300,60)-(500,120),0,2:PAINT (10,10),1
LINE(30,20)-(90,34),3,bf:LINE(110,20)-(170,34),3,bf
CALL linieren(30!,20!,90!,34!):CALL linieren(110!,20!,170!,34!)
COLOR 2,3:LOCATE 4,8:PRINT "JA":LOCATE 4,17:PRINT "NEIN"
CALL maus1(30!,20!,90!,34!,110!,20!,170!,34!)
END SUB